﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Text;

namespace Mn.Framework.Service.Messaging
{
    public class SmtpServerConfig : SmtpClient
    {
        public SmtpServerConfig(ISmtpServer smtpServer)
        {
            this.EnableSsl = true;
            this.Timeout = 300000;//10min
            this.DeliveryMethod = SmtpDeliveryMethod.Network;
            this.UseDefaultCredentials = false;
            this.Host = smtpServer.HostAddress;
            this.Port = smtpServer.Port;
            this.Credentials = smtpServer.Credential;
        }
    }
}
